package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 * @author hua
 * @since 2025-01-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_mail")
public class MailDo extends Model<MailDo> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("account_id")
    private Long accountId;

    @TableField("company_id")
    private Long companyId;

    @TableField("subject")
    private String subject;

    @TableField("msg_id")
    private String msgId;

    /**
     * 发送邮件时自定义id
     */
    @TableField("custom_id")
    private String customId;

    @TableField("mail_to")
    private String mailTo;

    @TableField("cc")
    private String cc;

    @TableField("received_date")
    private Date receivedDate;

    @TableField("sender")
    private String sender;

    @TableField("sender_nick")
    private String senderNick;

    @TableField("send_date")
    private Date sendDate;

    @TableField("content_type")
    private String contentType;

    @TableField("update_time")
    private Date updateTime;

    @TableField("update_by")
    private Long updateBy;

    @TableField("delete_time")
    private Date deleteTime;

    @TableField("delete_by")
    private Long deleteBy;

    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @TableField("is_read")
    private Boolean isRead;

    @TableField("is_contains_file")
    private Boolean isContainsFile;

    /**
     * 回信地址
     */
    @TableField("reply_to")
    private String replyTo;

    @TableField("text_plain")
    private String textPlain;

    @TableField("text_html")
    private String textHtml;

    /**
     * 发信是否成功
     */
    @TableField("status")
    private String status;

    /**
     * 文件夹名称(多级目录)
     */
    @TableField("folder_name")
    private String folderName;

    /**
     * 文件夹类型是收件箱还是 发件箱，垃圾箱
     */
    @TableField("type")
    private String type;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
